{% extends 'configmanager/__base__.html' %}
{% block title %}修改ECS | {% endblock %}
{% block goback %}{% url 'configmanager:ecslist' %}{% endblock %}
{% block content %}

<h4>{{ ecs.name }}</h4>

{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

<form action="{% url 'configmanager:ecssave' ecs.id %}" method="post">
{% csrf_token %}
    <div>
        <label>实例ID：</label>
        <span>{{ ecs.instanceid }}</span>
    </div>
    <div>
        <label>状态：</label>
        <select name='status'>
            {% if ecs.status == "Y" %}
                <option value ="Y">启用</option>
                <option value ="N">禁用</option>
            {% endif %}
            {% if ecs.status == "N" %}
                <option value ="N">禁用</option>
                <option value ="Y">启用</option>
            {% endif %}
        </select>
    </div>
    <div>
        <p><span>修改人：</span>{{ ecs.modified_user }}</p>
    </div>
    <div>
        <p><span>最后修改时间：</span>{{ ecs.modified_time }}</p>
    </div>
    <input type="submit" value="保存" />
</form>
<form action="{% url 'configmanager:ecsdelete' ecs.id %}" method="post">
{% csrf_token %}
    <input type="submit" value="删除" />
</form>
<form action="{% url 'configmanager:ecslist' %}" method="get">
{% csrf_token %}
    <input type="submit" value="返回" />
</form>
{% endblock %}
